<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/PAlgebra.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">PAlgebra.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_p_algebra_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_PALGEBRA_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_PALGEBRA_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;exception&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &lt;complex&gt;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="zz_x_8h.html">helib/zzX.h</a>&gt;</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="hypercube_8h.html">helib/hypercube.h</a>&gt;</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_p_g_f_f_t_8h.html">helib/PGFFT.h</a>&gt;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="cloned_ptr_8h.html">helib/clonedPtr.h</a>&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="api_attributes_8h.html">helib/apiAttributes.h</a>&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structhelib_1_1half___f_f_t.html">   32</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1half___f_f_t.html">half_FFT</a></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structhelib_1_1half___f_f_t.html#aa631a06ac73e0d395facbe6def99d83a">   34</a></span>&#160;  <a class="code" href="classhelib_1_1_p_g_f_f_t.html">PGFFT</a> <a class="code" href="structhelib_1_1half___f_f_t.html#aa631a06ac73e0d395facbe6def99d83a">fft</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structhelib_1_1half___f_f_t.html#abd74c5f01202b914dfe28816585cff9a">   35</a></span>&#160;  std::vector&lt;std::complex&lt;double&gt;&gt; <a class="code" href="structhelib_1_1half___f_f_t.html#abd74c5f01202b914dfe28816585cff9a">pow</a>;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <a class="code" href="structhelib_1_1half___f_f_t.html#a555b6cca1e0f35cb599448afa16c579e">half_FFT</a>(<span class="keywordtype">long</span> m);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;};</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structhelib_1_1quarter___f_f_t.html">   40</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structhelib_1_1quarter___f_f_t.html">quarter_FFT</a></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structhelib_1_1quarter___f_f_t.html#a330b21279057be0d0526e28830d43d74">   42</a></span>&#160;  <a class="code" href="classhelib_1_1_p_g_f_f_t.html">PGFFT</a> <a class="code" href="structhelib_1_1quarter___f_f_t.html#a330b21279057be0d0526e28830d43d74">fft</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structhelib_1_1quarter___f_f_t.html#a6de8ccec00cdedeedcff3cec9924097a">   43</a></span>&#160;  std::vector&lt;std::complex&lt;double&gt;&gt; <a class="code" href="structhelib_1_1quarter___f_f_t.html#a858f766a1f28499f273e08d44d0cd77a">pow1</a>, <a class="code" href="structhelib_1_1quarter___f_f_t.html#a6de8ccec00cdedeedcff3cec9924097a">pow2</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <a class="code" href="structhelib_1_1quarter___f_f_t.html#a6a63a9ee127071bb6d8f394aeb6f7589">quarter_FFT</a>(<span class="keywordtype">long</span> m);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;};</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html">   76</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;{</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordtype">long</span> m; <span class="comment">// the integer m defines (Z/mZ)^*, Phi_m(X), etc.</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="keywordtype">long</span> p; <span class="comment">// the prime base of the plaintext space</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keywordtype">long</span> phiM;      <span class="comment">// phi(m)</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keywordtype">long</span> ordP;      <span class="comment">// the order of p in (Z/mZ)^*</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keywordtype">long</span> nfactors;  <span class="comment">// number of distinct prime factors of m</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordtype">long</span> radm;      <span class="comment">// rad(m) = prod of distinct primes dividing m</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordtype">double</span> normBnd; <span class="comment">// max-norm-on-pwfl-basis &lt;= normBnd * max-norm-canon-embed</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordtype">double</span> polyNormBnd; <span class="comment">// max-norm-on-poly-basis &lt;= polyNormBnd *</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                      <span class="comment">// max-norm-canon-embed</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordtype">long</span> pow2; <span class="comment">// if m = 2^k, then pow2 == k; otherwise, pow2 == 0</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  std::vector&lt;long&gt; gens; <span class="comment">// Our generators for (Z/mZ)^* (other than p)</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="comment">//  native[i] is true iff gens[i] has the same order in the quotient</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <span class="comment">//  group as its order in Zm*.</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  NTL::Vec&lt;bool&gt; native;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="comment">// frob_perturb[i] = j if gens[i] raised to its order equals p^j,</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <span class="comment">// otherwise -1</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  NTL::Vec&lt;long&gt; frob_perturb;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <a class="code" href="classhelib_1_1_cube_signature.html">CubeSignature</a> cube; <span class="comment">// the hypercube structure of Zm* /(p)</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  NTL::ZZX PhimX; <span class="comment">// Holds the integer polynomial Phi_m(X)</span></div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordtype">double</span> cM; <span class="comment">// the &quot;ring constant&quot; c_m for Z[X]/Phi_m(X)</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="comment">// NOTE: cM is related to the ratio between the l_infinity norm of</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="comment">// a &quot;random&quot; ring element in different bases. For example, think of</span></div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="comment">// choosing the power-basis coefficients of x uniformly at random in</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <span class="comment">// [+-a/2] (for some parameter a), then the powerful basis norm of x</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  <span class="comment">// should be bounded whp by cM*a.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="comment">//</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <span class="comment">// More precisely, for an element x whose coefficients are chosen</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="comment">// uniformly in [+-a/2] (in either the powerful or the power basis)</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="comment">// we have a high-probability bound |x|_canonical &lt; A*a for some</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="comment">// A = O(sqrt(phi(m)). Also for &quot;random enough&quot; x we have some bound</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <span class="comment">//       |x|_powerful &lt; |x|_canonical * B</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="comment">// where we &quot;hope&quot; that B = O(1/sqrt(phi(m)). The cM value is</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="comment">// supposed to be cM=A*B.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="comment">//</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <span class="comment">// The value cM is only used for bootstrapping, see more comments</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <span class="comment">// for the method RecryptData::setAE in recryption.cpp. Also see</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="comment">// Appendix A of https://ia.cr/2014/873 (updated version from 2019)</span></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  std::vector&lt;long&gt; T;    <span class="comment">// The representatives for the quotient group Zm* /(p)</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  std::vector&lt;long&gt; Tidx; <span class="comment">// i=Tidx[t] is the index i s.t. T[i]=t.</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                          <span class="comment">// Tidx[t]==-1 if t notin T</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  std::vector&lt;long&gt; zmsIdx; <span class="comment">// if t is the i&#39;th element in Zm* then zmsIdx[t]=i</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                            <span class="comment">// zmsIdx[t]==-1 if t notin Zm*</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  std::vector&lt;long&gt; zmsRep; <span class="comment">// inverse of zmsIdx</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  std::shared_ptr&lt;PGFFT&gt; fftInfo; <span class="comment">// info for computing m-point complex FFT&#39;s</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;                                  <span class="comment">// shard_ptr allows delayed initialization</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                                  <span class="comment">// and lightweight copying</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  std::shared_ptr&lt;half_FFT&gt; half_fftInfo;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <span class="comment">// an optimization for FFT&#39;s with even m</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  std::shared_ptr&lt;quarter_FFT&gt; quarter_fftInfo;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  <span class="comment">// an optimization for FFT&#39;s with m = 0 (mod 4)</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <a class="code" href="classhelib_1_1_p_algebra.html#abd266cd5f06d96f8628eed8aaf6ee7b7">PAlgebra</a>(<span class="keywordtype">long</span> mm,</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;           <span class="keywordtype">long</span> pp = 2,</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;           <span class="keyword">const</span> std::vector&lt;long&gt;&amp; _gens = std::vector&lt;long&gt;(),</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;           <span class="keyword">const</span> std::vector&lt;long&gt;&amp; _ords = std::vector&lt;long&gt;()); <span class="comment">// constructor</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160; </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra.html#a6e1077c7f6b83071d3bcdd7370ecbe1a">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a794076ed8df723e12de03a2cdeadcc29">  150</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra.html#a794076ed8df723e12de03a2cdeadcc29">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other); }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  <span class="comment">// comparison</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <span class="comment">/* I/O methods */</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra.html#a87dae80314766ef1cf15402f040bcd0d">printout</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra.html#a888fa6fa19f172c9f1a27a60a273696c">printAll</a>() <span class="keyword">const</span>; <span class="comment">// print even more</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  <span class="comment">/* Access methods */</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a6852047dd695a0b1ae1a5ea03c3b2c53">  162</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a6852047dd695a0b1ae1a5ea03c3b2c53">getM</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m; }</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a5563b7dc7f0559d779bf869fbe4b3a5f">  165</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a5563b7dc7f0559d779bf869fbe4b3a5f">getP</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> p; }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a4422e1911052282a6881fa97ae5061dd">  168</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a4422e1911052282a6881fa97ae5061dd">getPhiM</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> phiM; }</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#abc2f07b5e26ca6c049785b1e138c57b8">  171</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#abc2f07b5e26ca6c049785b1e138c57b8">getOrdP</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> ordP; }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#afb8bd85921189335d6d6f2fe30011907">  174</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#afb8bd85921189335d6d6f2fe30011907">getNFactors</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> nfactors; }</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ad094fa9125ca7f35bece1480dbb870cb">  177</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#ad094fa9125ca7f35bece1480dbb870cb">getRadM</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> radm; }</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#aa2ccff097bb152c82012046e0e781b62">  180</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classhelib_1_1_p_algebra.html#aa2ccff097bb152c82012046e0e781b62">getNormBnd</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> normBnd; }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ad3d8dd3e7f2bab8486357e0f1e0cc01e">  183</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classhelib_1_1_p_algebra.html#ad3d8dd3e7f2bab8486357e0f1e0cc01e">getPolyNormBnd</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> polyNormBnd; }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a5a90fd828a817490c390947228ecf928">  186</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a5a90fd828a817490c390947228ecf928">getNSlots</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">getSize</a>(); }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#afd431a1ba58a00ffa22fa05a0b02da67">  189</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#afd431a1ba58a00ffa22fa05a0b02da67">getPow2</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> pow2; }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#aa5cacf4d0667eb9a921ba5b557a09632">  192</a></span>&#160;  <span class="keyword">const</span> NTL::ZZX&amp; <a class="code" href="classhelib_1_1_p_algebra.html#aa5cacf4d0667eb9a921ba5b557a09632">getPhimX</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> PhimX; }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a29eea1b1f91c49000f1ce02b5546e73a">  195</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra.html#a29eea1b1f91c49000f1ce02b5546e73a">set_cM</a>(<span class="keywordtype">double</span> c) { cM = c; }</div>
<div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a3dcfa1c03e7f17674c16e9d25687f87a">  196</a></span>&#160;  <span class="keywordtype">double</span> <a class="code" href="classhelib_1_1_p_algebra.html#a3dcfa1c03e7f17674c16e9d25687f87a">get_cM</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cM; }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <span class="comment">//  const std::vector&lt;long&gt; getMfactors() const { return mFactors; }</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a5e4b044f71ca8edcfa4426cb199461f0">  202</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a5e4b044f71ca8edcfa4426cb199461f0">numOfGens</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> gens.size(); }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#aa0f6448b824d27233d9fbed310a70641">  205</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#aa0f6448b824d27233d9fbed310a70641">ZmStarGen</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (i &lt; <span class="keywordtype">long</span>(gens.size())) ? gens[i] : 0; }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;  <span class="comment">// VJS: I&#39;m moving away from all of this unsigned stuff...</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;  <span class="comment">// Also, note that j really may be negative</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <span class="comment">// NOTE: i == -1 means Frobenius</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a1e1a00b24fd8cef132e213b1b0c290bc">genToPow</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160; </div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;  <span class="comment">// p to the power j mod m</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a6a60cd957fcf220607acafd96de3737d">frobeniusPow</a>(<span class="keywordtype">long</span> j) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ab01ff1a6b2a0eceba09d688a933de360">  217</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#ab01ff1a6b2a0eceba09d688a933de360">OrderOf</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">getDim</a>(i); }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160; </div>
<div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a0388643441be4063002c63398b770361">  220</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a0388643441be4063002c63398b770361">ProdOrdsFrom</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">getProd</a>(i); }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a427d4228e407fbf694191ad18842e90d">  223</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra.html#a427d4228e407fbf694191ad18842e90d">SameOrd</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> native[i]; }</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160; </div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;  <span class="comment">// FrobPerturb[i] = j if gens[i] raised to its order equals p^j,</span></div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <span class="comment">// where j in [0..ordP), otherwise -1</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a6348a15c7c781dd026993577bf43a6cb">  227</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a6348a15c7c781dd026993577bf43a6cb">FrobPerturb</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> frob_perturb[i]; }</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a09f3f7d864c1989663a51f43984777f3">  232</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a09f3f7d864c1989663a51f43984777f3">ith_rep</a>(<span class="keywordtype">long</span> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (i &lt; <a class="code" href="classhelib_1_1_p_algebra.html#a5a90fd828a817490c390947228ecf928">getNSlots</a>()) ? T[i] : 0; }</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a8b99ace4bf35e1ff128147ca5d58e4d9">  235</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a8b99ace4bf35e1ff128147ca5d58e4d9">indexOfRep</a>(<span class="keywordtype">long</span> t)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (t &gt; 0 &amp;&amp; t &lt; m) ? Tidx[t] : -1; }</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a0bea13d33d64fcaab59ed2b0b5c5100a">  238</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra.html#a0bea13d33d64fcaab59ed2b0b5c5100a">isRep</a>(<span class="keywordtype">long</span> t)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (t &gt; 0 &amp;&amp; t &lt; m &amp;&amp; Tidx[t] &gt; -1); }</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a99dfe4797026a43ffa9d5513b77eb709">  241</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a99dfe4797026a43ffa9d5513b77eb709">indexInZmstar</a>(<span class="keywordtype">long</span> t)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (t &gt; 0 &amp;&amp; t &lt; m) ? zmsIdx[t] : -1; }</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ade7911f93f80ebe11cf7ba7a59fa921f">  244</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#ade7911f93f80ebe11cf7ba7a59fa921f">indexInZmstar_unchecked</a>(<span class="keywordtype">long</span> t)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> zmsIdx[t]; }</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160; </div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ab3249eb57b3278851dafe777ddad1e29">  247</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#ab3249eb57b3278851dafe777ddad1e29">repInZmstar_unchecked</a>(<span class="keywordtype">long</span> idx)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> zmsRep[idx]; }</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a30408cf321051115b46bb75f9c9cc898">  249</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra.html#a30408cf321051115b46bb75f9c9cc898">inZmStar</a>(<span class="keywordtype">long</span> t)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (t &gt; 0 &amp;&amp; t &lt; m &amp;&amp; zmsIdx[t] &gt; -1); }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a1f95fe47b88f5c8768a53f0b190d15bf">exponentiate</a>(<span class="keyword">const</span> std::vector&lt;long&gt;&amp; exps,</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                    <span class="keywordtype">bool</span> onlySameOrd = <span class="keyword">false</span>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160; </div>
<div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#afb2bad9633f98f52f81a7670c0d9bef4">  257</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#afb2bad9633f98f52f81a7670c0d9bef4">coordinate</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> k)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">getCoord</a>(k, i); }</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ae946c16cfbf1d51ae5b2fdb87d08ed89">  261</a></span>&#160;  std::pair&lt;long, long&gt; <a class="code" href="classhelib_1_1_p_algebra.html#ae946c16cfbf1d51ae5b2fdb87d08ed89">breakIndexByDim</a>(<span class="keywordtype">long</span> idx, <span class="keywordtype">long</span> dim)<span class="keyword"> const</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a52ab718393d2c41b96b000948adc6e0b">breakIndexByDim</a>(idx, dim);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;  }</div>
<div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a39c3e8cd2438e3215d8b4d24cfd1f235">  266</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#a39c3e8cd2438e3215d8b4d24cfd1f235">assembleIndexByDim</a>(std::pair&lt;long, long&gt; idx, <span class="keywordtype">long</span> dim)<span class="keyword"> const</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a94042541a4cc00ed145b38c77a65ebac">assembleIndexByDim</a>(idx, dim);</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;  }</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#adfc198eb325759da0eb07e1edad86a2b">  272</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#adfc198eb325759da0eb07e1edad86a2b">addCoord</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> k, <span class="keywordtype">long</span> offset)<span class="keyword"> const</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">addCoord</a>(k, i, offset);</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  }</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160; </div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  <span class="comment">/* Miscellaneous */</span></div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a9b134922f5863ccdaa130a491cad0070">  282</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra.html#a9b134922f5863ccdaa130a491cad0070">nextExpVector</a>(std::vector&lt;long&gt;&amp; exps)<span class="keyword"> const</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">return</span> cube.<a class="code" href="classhelib_1_1_cube_signature.html#a07dafff8898d869fdf4cda00aea5453a">incrementCoords</a>(exps);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  }</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160; </div>
<div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ae7353f229e73916f05088c9387728483">  288</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra.html#ae7353f229e73916f05088c9387728483">fftSizeNeeded</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> NTL::NextPowerOfTwo(<a class="code" href="classhelib_1_1_p_algebra.html#a6852047dd695a0b1ae1a5ea03c3b2c53">getM</a>()) + 1; }</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160; </div>
<div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a5152c047d2440c4b26cbfb535b405cb2">  290</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_g_f_f_t.html">PGFFT</a>&amp; <a class="code" href="classhelib_1_1_p_algebra.html#a5152c047d2440c4b26cbfb535b405cb2">getFFTInfo</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *fftInfo; }</div>
<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#a3c01f838fab8cee32bc74602df146c79">  291</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1half___f_f_t.html">half_FFT</a>&amp; <a class="code" href="classhelib_1_1_p_algebra.html#a3c01f838fab8cee32bc74602df146c79">getHalfFFTInfo</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *half_fftInfo; }</div>
<div class="line"><a name="l00292"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra.html#ab9403a0bcbcf9bf40931408891e283f9">  292</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="structhelib_1_1quarter___f_f_t.html">quarter_FFT</a>&amp; <a class="code" href="classhelib_1_1_p_algebra.html#ab9403a0bcbcf9bf40931408891e283f9">getQuarterFFTInfo</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> *quarter_fftInfo; }</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;};</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">  295</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;{</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7eab33244c736f38a4c21e6d86c6a683d58">  297</a></span>&#160;  <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7eab33244c736f38a4c21e6d86c6a683d58">PA_GF2_tag</a>,</div>
<div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea63d35380340004730e7cb505a4da38e2">  298</a></span>&#160;  <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea63d35380340004730e7cb505a4da38e2">PA_zz_p_tag</a>,</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea7d944116ae9eb1abb2d5fa92bb6d21ee">PA_cx_tag</a></div>
<div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea7d944116ae9eb1abb2d5fa92bb6d21ee">  300</a></span>&#160;};</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160; </div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;<span class="keyword">class </span>DummyBak</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;{</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;  <span class="comment">// placeholder class used in GF2X impl</span></div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160; </div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;  <span class="keywordtype">void</span> save() {}</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;  <span class="keywordtype">void</span> restore()<span class="keyword"> const </span>{}</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;};</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160; </div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="keyword">class </span>DummyContext</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;{</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  <span class="comment">// placeholder class used in GF2X impl</span></div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160; </div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  <span class="keywordtype">void</span> save() {}</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;  <span class="keywordtype">void</span> restore()<span class="keyword"> const </span>{}</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  DummyContext() {}</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  DummyContext(<span class="keywordtype">long</span>) {}</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;};</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160; </div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">// some stuff to help with template code</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> R&gt;</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;<span class="keyword">struct </span>GenericModulus</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;{};</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160; </div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;<span class="keyword">template</span> &lt;&gt;</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;<span class="keyword">struct </span>GenericModulus&lt;<a class="code" href="namespace_n_t_l.html">NTL</a>::zz_p&gt;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;{</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> init(<span class="keywordtype">long</span> p) { NTL::zz_p::init(p); }</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;};</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160; </div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;<span class="keyword">template</span> &lt;&gt;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;<span class="keyword">struct </span>GenericModulus&lt;<a class="code" href="namespace_n_t_l.html">NTL</a>::GF2&gt;</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;{</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> init(<span class="keywordtype">long</span> p)</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;  {</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    assertEq&lt;InvalidArgument&gt;(p, 2l, <span class="stringliteral">&quot;Cannot init NTL::GF2 with p not 2&quot;</span>);</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;  }</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;};</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160; </div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;<span class="keyword">class </span>PA_GF2</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;{</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;  <span class="comment">// typedefs for algebraic structures built up from GF2</span></div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160; </div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a> tag = <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7eab33244c736f38a4c21e6d86c6a683d58">PA_GF2_tag</a>;</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;  <span class="keyword">typedef</span> NTL::GF2 R;</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;  <span class="keyword">typedef</span> NTL::GF2X RX;</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;  <span class="keyword">typedef</span> NTL::vec_GF2X vec_RX;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;  <span class="keyword">typedef</span> NTL::GF2XModulus RXModulus;</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;  <span class="keyword">typedef</span> DummyBak RBak;</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;  <span class="keyword">typedef</span> DummyContext RContext;</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;  <span class="keyword">typedef</span> NTL::GF2E RE;</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;  <span class="keyword">typedef</span> NTL::vec_GF2E vec_RE;</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;  <span class="keyword">typedef</span> NTL::mat_GF2E mat_RE;</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;  <span class="keyword">typedef</span> NTL::GF2EX REX;</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;  <span class="keyword">typedef</span> NTL::GF2EBak REBak;</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;  <span class="keyword">typedef</span> NTL::vec_GF2EX vec_REX;</div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;  <span class="keyword">typedef</span> NTL::GF2EContext REContext;</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;  <span class="keyword">typedef</span> NTL::mat_GF2 mat_R;</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;  <span class="keyword">typedef</span> NTL::vec_GF2 vec_R;</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;};</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160; </div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;<span class="keyword">class </span>PA_zz_p</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;{</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;  <span class="comment">// typedefs for algebraic structures built up from zz_p</span></div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160; </div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a> tag = <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea63d35380340004730e7cb505a4da38e2">PA_zz_p_tag</a>;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;  <span class="keyword">typedef</span> NTL::zz_p R;</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pX RX;</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;  <span class="keyword">typedef</span> NTL::vec_zz_pX vec_RX;</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pXModulus RXModulus;</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pBak RBak;</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pContext RContext;</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pE RE;</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;  <span class="keyword">typedef</span> NTL::vec_zz_pE vec_RE;</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;  <span class="keyword">typedef</span> NTL::mat_zz_pE mat_RE;</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pEX REX;</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pEBak REBak;</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;  <span class="keyword">typedef</span> NTL::vec_zz_pEX vec_REX;</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;  <span class="keyword">typedef</span> NTL::zz_pEContext REContext;</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;  <span class="keyword">typedef</span> NTL::mat_zz_p mat_R;</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;  <span class="keyword">typedef</span> NTL::vec_zz_p vec_R;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;};</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160; </div>
<div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html">  418</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_p_algebra_mod_base.html">PAlgebraModBase</a></div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;{</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160; </div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00422"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#a98ba2824e68366e7266717ff9f077334">  422</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a98ba2824e68366e7266717ff9f077334">~PAlgebraModBase</a>() {}</div>
<div class="line"><a name="l00423"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#a11f446121f3f4e99004ac5f63cd9222d">  423</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html">PAlgebraModBase</a>* <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a11f446121f3f4e99004ac5f63cd9222d">clone</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160; </div>
<div class="line"><a name="l00426"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#a8df7e36de931c1365efc1a1ec9ef0a59">  426</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a8df7e36de931c1365efc1a1ec9ef0a59">getTag</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160; </div>
<div class="line"><a name="l00429"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#a7bcc03053392d25c4a8d1c3eb36107e1">  429</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a7bcc03053392d25c4a8d1c3eb36107e1">getZMStar</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160; </div>
<div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#ae9aa0cf6f8db16b0eaad3f2d4362a37c">  432</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> std::vector&lt;NTL::ZZX&gt;&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#ae9aa0cf6f8db16b0eaad3f2d4362a37c">getFactorsOverZZ</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160; </div>
<div class="line"><a name="l00435"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#adead1be06feaba45fa7dab3a34b856a3">  435</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#adead1be06feaba45fa7dab3a34b856a3">getR</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160; </div>
<div class="line"><a name="l00438"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#a909cc316ce549f517857b17c172aae7b">  438</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a909cc316ce549f517857b17c172aae7b">getPPowR</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160; </div>
<div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_base.html#a87de36ed5995b6baf94954b6810b9130">  441</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a87de36ed5995b6baf94954b6810b9130">restoreContext</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160; </div>
<div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="classhelib_1_1_mapping_data.html#aa86eaf9f08c268ab93da787db2ea1dd2">  443</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html#a61bf1413f4b2e9050d83915984036bc6">getMask_zzX</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;};</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160; </div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;<span class="preprocessor">#ifndef DOXYGEN_IGNORE</span></div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;<span class="preprocessor">#define PA_INJECT(typ)                                                         \</span></div>
<div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">  448</a></span>&#160;<span class="preprocessor">  static const PA_tag tag = typ::tag;                                          \</span></div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;<span class="preprocessor">  typedef typename typ::R R;                                                   \</span></div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;<span class="preprocessor">  typedef typename typ::RX RX;                                                 \</span></div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;<span class="preprocessor">  typedef typename typ::vec_RX vec_RX;                                         \</span></div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;<span class="preprocessor">  typedef typename typ::RXModulus RXModulus;                                   \</span></div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;<span class="preprocessor">  typedef typename typ::RBak RBak;                                             \</span></div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;<span class="preprocessor">  typedef typename typ::RContext RContext;                                     \</span></div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;<span class="preprocessor">  typedef typename typ::RE RE;                                                 \</span></div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;<span class="preprocessor">  typedef typename typ::vec_RE vec_RE;                                         \</span></div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;<span class="preprocessor">  typedef typename typ::mat_RE mat_RE;                                         \</span></div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;<span class="preprocessor">  typedef typename typ::REX REX;                                               \</span></div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="preprocessor">  typedef typename typ::REBak REBak;                                           \</span></div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;<span class="preprocessor">  typedef typename typ::vec_REX vec_REX;                                       \</span></div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;<span class="preprocessor">  typedef typename typ::REContext REContext;                                   \</span></div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;<span class="preprocessor">  typedef typename typ::mat_R mat_R;                                           \</span></div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;<span class="preprocessor">  typedef typename typ::vec_R vec_R;</span></div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160; </div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160; </div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00468"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html">  468</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived</a>;</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;<span class="comment">// forward declaration</span></div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160; </div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00473"></a><span class="lineno"><a class="line" href="classhelib_1_1_mapping_data.html">  473</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_mapping_data.html">MappingData</a></div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;{</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160; </div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160; </div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived</a>&lt;type&gt;;</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160; </div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;  RX G;      <span class="comment">// the polynomial defining the field extension</span></div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;  <span class="keywordtype">long</span> degG; <span class="comment">// the degree of the polynomial</span></div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160; </div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;  REContext contextForG;</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160; </div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;  <span class="comment">/* the remaining fields are visible only to PAlgebraModDerived */</span></div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160; </div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;  std::vector&lt;RX&gt; maps;</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;  std::vector&lt;mat_R&gt; matrix_maps;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;  std::vector&lt;REX&gt; rmaps;</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160; </div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="classhelib_1_1_mapping_data.html#aedaecfbec10f647a8bfafee57c4f5b9f">  494</a></span>&#160;  <span class="keyword">const</span> RX&amp; <a class="code" href="classhelib_1_1_mapping_data.html#aedaecfbec10f647a8bfafee57c4f5b9f">getG</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> G; }</div>
<div class="line"><a name="l00495"></a><span class="lineno"><a class="line" href="classhelib_1_1_mapping_data.html#af2df06fc054ae5ea95959c3b5c1db8ca">  495</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_mapping_data.html#af2df06fc054ae5ea95959c3b5c1db8ca">getDegG</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> degG; }</div>
<div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="classhelib_1_1_mapping_data.html#a0939fcc81b1ac4033a8a165ecd220ae1">  496</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_mapping_data.html#a0939fcc81b1ac4033a8a165ecd220ae1">restoreContextForG</a>()<span class="keyword"> const </span>{ contextForG.restore(); }</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160; </div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;  <span class="comment">// copy and assignment</span></div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;};</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160; </div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;<span class="keyword">class </span>TNode</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;{</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;  std::shared_ptr&lt;TNode&lt;T&gt;&gt; left, right;</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;  T data;</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160; </div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;  TNode(std::shared_ptr&lt;TNode&lt;T&gt;&gt; _left,</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;        std::shared_ptr&lt;TNode&lt;T&gt;&gt; _right,</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        <span class="keyword">const</span> T&amp; _data) :</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;      left(_left), right(_right), data(_data)</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;  {}</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;};</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160; </div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;std::shared_ptr&lt;TNode&lt;T&gt;&gt; buildTNode(std::shared_ptr&lt;TNode&lt;T&gt;&gt; left,</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;                                     std::shared_ptr&lt;TNode&lt;T&gt;&gt; right,</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;                                     <span class="keyword">const</span> T&amp; data)</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;{</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;  <span class="keywordflow">return</span> std::shared_ptr&lt;TNode&lt;T&gt;&gt;(<span class="keyword">new</span> TNode&lt;T&gt;(left, right, data));</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;}</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160; </div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;std::shared_ptr&lt;TNode&lt;T&gt;&gt; nullTNode()</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;{</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;  <span class="keywordflow">return</span> std::shared_ptr&lt;TNode&lt;T&gt;&gt;();</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;}</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160; </div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;<span class="keyword">class </span>PAlgebraModDerived : <span class="keyword">public</span> PAlgebraModBase</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;{</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;  <a class="code" href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a>(type)</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160; </div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;  <span class="keyword">const</span> PAlgebra&amp; zMStar;</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;  <span class="keywordtype">long</span> r;</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;  <span class="keywordtype">long</span> pPowR;</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;  RContext pPowRContext;</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160; </div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;  RXModulus PhimXMod;</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160; </div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;  vec_RX factors;</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;  std::vector&lt;NTL::ZZX&gt; factorsOverZZ;</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;  vec_RX crtCoeffs;</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;  std::vector&lt;std::vector&lt;RX&gt;&gt; maskTable;</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;  std::vector&lt;RX&gt; crtTable;</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;  std::shared_ptr&lt;TNode&lt;RX&gt;&gt; crtTree;</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160; </div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;  <span class="keywordtype">void</span> genMaskTable();</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;  <span class="keywordtype">void</span> genCrtTable();</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160; </div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;  <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#ad04d8b9a2004e0c8e6fe79993b3af266">PAlgebraModDerived</a>(<span class="keyword">const</span> PAlgebra&amp; zMStar, <span class="keywordtype">long</span> r);</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160; </div>
<div class="line"><a name="l00559"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a69f13c0ea26e5965d55ecae8e4ca936f">  559</a></span>&#160;  <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a69f13c0ea26e5965d55ecae8e4ca936f">PAlgebraModDerived</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived</a>&amp; other) <span class="comment">// copy constructor</span></div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;      :</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;      zMStar(other.zMStar),</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;      r(other.r),</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;      pPowR(other.pPowR),</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;      pPowRContext(other.pPowRContext)</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;  {</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;    RBak bak;</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;    bak.save();</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a3e923834650c8fedd2139b416edd5950">restoreContext</a>();</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    PhimXMod = other.PhimXMod;</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;    factors = other.factors;</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;    maskTable = other.maskTable;</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    crtTable = other.crtTable;</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    crtTree = other.crtTree;</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;  }</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160; </div>
<div class="line"><a name="l00576"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a998b31a5d4f8f114b4582d5035decd63">  576</a></span>&#160;  <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a998b31a5d4f8f114b4582d5035decd63">operator=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived</a>&amp; other) <span class="comment">// assignment</span></div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;  {</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;    <span class="keywordflow">if</span> (<span class="keyword">this</span> == &amp;other)</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160; </div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;    <a class="code" href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">assertEq</a>(&amp;zMStar,</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;             &amp;other.zMStar,</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;             <span class="stringliteral">&quot;Cannot assign PAlgebras with different zMStar values&quot;</span>);</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;    r = other.r;</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;    pPowR = other.pPowR;</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;    pPowRContext = other.pPowRContext;</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160; </div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;    RBak bak;</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    bak.save();</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;    <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a3e923834650c8fedd2139b416edd5950">restoreContext</a>();</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;    PhimXMod = other.PhimXMod;</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    factors = other.factors;</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    maskTable = other.maskTable;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;    crtTable = other.crtTable;</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;    crtTree = other.crtTree;</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160; </div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;  }</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160; </div>
<div class="line"><a name="l00601"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a6725ea77f4da18fb3cb4da5d77253e8c">  601</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html">PAlgebraModBase</a>* <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a6725ea77f4da18fb3cb4da5d77253e8c">clone</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#ad04d8b9a2004e0c8e6fe79993b3af266">PAlgebraModDerived</a>(*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;  }</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160; </div>
<div class="line"><a name="l00607"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a59d05e06d579ef86cc7d053d43e9717b">  607</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a59d05e06d579ef86cc7d053d43e9717b">getTag</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> tag; }</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160; </div>
<div class="line"><a name="l00610"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#aa63328efb58148204ed8a95287be7c19">  610</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#aa63328efb58148204ed8a95287be7c19">getZMStar</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> zMStar; }</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160; </div>
<div class="line"><a name="l00613"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a14ea53104683d77545f74fc01046bf37">  613</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> std::vector&lt;NTL::ZZX&gt;&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a14ea53104683d77545f74fc01046bf37">getFactorsOverZZ</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;    <span class="keywordflow">return</span> factorsOverZZ;</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;  }</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160; </div>
<div class="line"><a name="l00619"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a1664ff2b064cf1d7e8c0aca13433b15d">  619</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a1664ff2b064cf1d7e8c0aca13433b15d">getR</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> r; }</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160; </div>
<div class="line"><a name="l00622"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a1c496a6f985fecf61f9a117d6c605cd6">  622</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a1c496a6f985fecf61f9a117d6c605cd6">getPPowR</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> pPowR; }</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160; </div>
<div class="line"><a name="l00625"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a3e923834650c8fedd2139b416edd5950">  625</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a3e923834650c8fedd2139b416edd5950">restoreContext</a>()<span class="keyword"> const override </span>{ pPowRContext.restore(); }</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160; </div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;  <span class="comment">/* In all of the following functions, it is expected that the caller</span></div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;<span class="comment">     has already restored the relevant modulus (p^r), which</span></div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;<span class="comment">     can be done by invoking the method restoreContext()</span></div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;<span class="comment">   */</span></div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160; </div>
<div class="line"><a name="l00633"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a955b41f3cb844015656bdd5b77e29e42">  633</a></span>&#160;  <span class="keyword">const</span> RXModulus&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a955b41f3cb844015656bdd5b77e29e42">getPhimXMod</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> PhimXMod; }</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160; </div>
<div class="line"><a name="l00636"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#af85c8c44c0f7b02252d5029b2b78f721">  636</a></span>&#160;  <span class="keyword">const</span> vec_RX&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#af85c8c44c0f7b02252d5029b2b78f721">getFactors</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> factors; }</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160; </div>
<div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a8486232ca5b941fa989f6cde8fe4f822">  641</a></span>&#160;  <span class="keyword">const</span> vec_RX&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a8486232ca5b941fa989f6cde8fe4f822">getCrtCoeffs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> crtCoeffs; }</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160; </div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;  <span class="comment">// logically, but not really, const</span></div>
<div class="line"><a name="l00656"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a6f05b5bdfb5c69e175a1108a20b7e897">  656</a></span>&#160;  <span class="keyword">const</span> std::vector&lt;std::vector&lt;RX&gt;&gt;&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a6f05b5bdfb5c69e175a1108a20b7e897">getMaskTable</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> maskTable; }</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160; </div>
<div class="line"><a name="l00658"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_derived.html#a4bc2cd5d3763efc2f1886cc8a6a6a80c">  658</a></span>&#160;  <a class="code" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a4bc2cd5d3763efc2f1886cc8a6a6a80c">getMask_zzX</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j)<span class="keyword"> const override</span></div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;    RBak bak;</div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    bak.save();</div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a3e923834650c8fedd2139b416edd5950">restoreContext</a>();</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#a7b1aa9d391c181e780742a2117e9af78">balanced_zzX</a>(maskTable.at(i).at(j));</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;  }</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160; </div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160; </div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a371f9d8e91bc5cecea179fbbb6a12c4f">CRT_decompose</a>(std::vector&lt;RX&gt;&amp; crt, <span class="keyword">const</span> RX&amp; H) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160; </div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#aa19526e11996167ac5fd039771a68293">CRT_reconstruct</a>(RX&amp; H, std::vector&lt;RX&gt;&amp; crt) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160; </div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a8b29b31503217f41ecf84e06bd30c908">mapToSlots</a>(<a class="code" href="classhelib_1_1_mapping_data.html">MappingData&lt;type&gt;</a>&amp; mappingData, <span class="keyword">const</span> RX&amp; G) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160; </div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#ad9f92e66f4d88cf8996a50e48bcecc27">embedInAllSlots</a>(RX&amp; H,</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;                       <span class="keyword">const</span> RX&amp; alpha,</div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;                       <span class="keyword">const</span> <a class="code" href="classhelib_1_1_mapping_data.html">MappingData&lt;type&gt;</a>&amp; mappingData) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160; </div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a2b4d5026fe299c45c9d68a76f3ea35e4">embedInSlots</a>(RX&amp; H,</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;                    <span class="keyword">const</span> std::vector&lt;RX&gt;&amp; alphas,</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;                    <span class="keyword">const</span> <a class="code" href="classhelib_1_1_mapping_data.html">MappingData&lt;type&gt;</a>&amp; mappingData) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160; </div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#a70dba3b1110147859f4c8fd96e6fb716">decodePlaintext</a>(std::vector&lt;RX&gt;&amp; alphas,</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;                       <span class="keyword">const</span> RX&amp; ptxt,</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;                       <span class="keyword">const</span> <a class="code" href="classhelib_1_1_mapping_data.html">MappingData&lt;type&gt;</a>&amp; mappingData) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160; </div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html#afeebe2f4b6e54aea60d2cd85d364712c">buildLinPolyCoeffs</a>(std::vector&lt;RX&gt;&amp; C,</div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;                          <span class="keyword">const</span> std::vector&lt;RX&gt;&amp; L,</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;                          <span class="keyword">const</span> <a class="code" href="classhelib_1_1_mapping_data.html">MappingData&lt;type&gt;</a>&amp; mappingData) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;  <span class="comment">/* internal functions, not for public consumption */</span></div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160; </div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">void</span> SetModulus(<span class="keywordtype">long</span> p)</div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;  {</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;    RContext context(p);</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    context.restore();</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;  }</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160; </div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;  <span class="keywordtype">void</span> mapToF1(RX&amp; w, <span class="keyword">const</span> RX&amp; G)<span class="keyword"> const </span>{ mapToFt(w, G, 1); }</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160; </div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;  <span class="keywordtype">void</span> mapToFt(RX&amp; w, <span class="keyword">const</span> RX&amp; G, <span class="keywordtype">long</span> t, <span class="keyword">const</span> RX* rF1 = <span class="keyword">nullptr</span>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160; </div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;  <span class="keywordtype">void</span> buildTree(std::shared_ptr&lt;TNode&lt;RX&gt;&gt;&amp; res,</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;                 <span class="keywordtype">long</span> offset,</div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;                 <span class="keywordtype">long</span> extent) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160; </div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;  <span class="keywordtype">void</span> evalTree(RX&amp; res,</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;                std::shared_ptr&lt;TNode&lt;RX&gt;&gt; tree,</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;                <span class="keyword">const</span> std::vector&lt;RX&gt;&amp; crt1,</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;                <span class="keywordtype">long</span> offset,</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;                <span class="keywordtype">long</span> extent) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;};</div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160; </div>
<div class="line"><a name="l00756"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html">  756</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_p_algebra_mod_cx.html">PAlgebraModCx</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_p_algebra_mod_base.html">PAlgebraModBase</a></div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;{</div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; zMStar;</div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;  <span class="keywordtype">long</span> r; <span class="comment">// counts bits of precision</span></div>
<div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160; </div>
<div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00762"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#aa7dfc285801f4422ef30fa0409976023">  762</a></span>&#160;  <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#aa7dfc285801f4422ef30fa0409976023">PAlgebraModCx</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; palg, <span class="keywordtype">long</span> _r) : zMStar(palg), r(_r)</div>
<div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;  {</div>
<div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;    assertInRange&lt;InvalidArgument&gt;(r,</div>
<div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;                                   1l,</div>
<div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;                                   (<span class="keywordtype">long</span>)NTL_SP_NBITS,</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;                                   <span class="stringliteral">&quot;Invalid bit precision r&quot;</span>);</div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;  }</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160; </div>
<div class="line"><a name="l00770"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#a3413dd44b1f24d197c62d4747b408608">  770</a></span>&#160;  <a class="code" href="classhelib_1_1_p_algebra_mod_base.html">PAlgebraModBase</a>* <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#a3413dd44b1f24d197c62d4747b408608">clone</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#aa7dfc285801f4422ef30fa0409976023">PAlgebraModCx</a>(*<span class="keyword">this</span>); }</div>
<div class="line"><a name="l00771"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#aa2014ae146f28814d83ae8dae0546230">  771</a></span>&#160;  <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#aa2014ae146f28814d83ae8dae0546230">getTag</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea7d944116ae9eb1abb2d5fa92bb6d21ee">PA_cx_tag</a>; }</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160; </div>
<div class="line"><a name="l00773"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#a5d2fd3234ccb5a63dd2a22d5e6dfcca0">  773</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#a5d2fd3234ccb5a63dd2a22d5e6dfcca0">getZMStar</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> zMStar; }</div>
<div class="line"><a name="l00774"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#a9df1389f699003bf1579b22efb4cc546">  774</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#a9df1389f699003bf1579b22efb4cc546">getR</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> r; }</div>
<div class="line"><a name="l00775"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#ad6761a53cc4fe80e280958782b18f31e">  775</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#ad6761a53cc4fe80e280958782b18f31e">getPPowR</a>()<span class="keyword"> const override </span>{ <span class="keywordflow">return</span> 1L &lt;&lt; r; }</div>
<div class="line"><a name="l00776"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#afa945a421ee7efc5c29bd0e54ece935d">  776</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#afa945a421ee7efc5c29bd0e54ece935d">restoreContext</a>()<span class="keyword"> const override </span>{}</div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160; </div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;  <span class="comment">// These function make no sense for PAlgebraModCx</span></div>
<div class="line"><a name="l00779"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#ac929261d8b2667e14b1c8c53e92c7f6c">  779</a></span>&#160;  <span class="keyword">const</span> std::vector&lt;NTL::ZZX&gt;&amp; <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#ac929261d8b2667e14b1c8c53e92c7f6c">getFactorsOverZZ</a>()<span class="keyword"> const override</span></div>
<div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;    <span class="keywordflow">throw</span> <a class="code" href="classhelib_1_1_logic_error.html">LogicError</a>(<span class="stringliteral">&quot;PAlgebraModCx::getFactorsOverZZ undefined&quot;</span>);</div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;  }</div>
<div class="line"><a name="l00783"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod_cx.html#ad8acaf1efa2937545f2969f408d76b01">  783</a></span>&#160;  <a class="code" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html#ad8acaf1efa2937545f2969f408d76b01">getMask_zzX</a>(<a class="code" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> <span class="keywordtype">long</span> i, <a class="code" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> <span class="keywordtype">long</span> j)<span class="keyword"> const override</span></div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;    <span class="keywordflow">throw</span> <a class="code" href="classhelib_1_1_logic_error.html">LogicError</a>(<span class="stringliteral">&quot;PAlgebraModCx::getMask_zzX undefined&quot;</span>);</div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;  }</div>
<div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;};</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160; </div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;PAlgebraModBase* <a class="code" href="namespacehelib.html#af7ad5bd5c310b0ad7f96d6e2065e5b2b">buildPAlgebraMod</a>(<span class="keyword">const</span> PAlgebra&amp; zMStar, <span class="keywordtype">long</span> r);</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160; </div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;<span class="comment">// A simple wrapper for a pointer to an object of type PAlgebraModBase.</span></div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;<span class="comment">// Direct access to the virtual methods of PAlgebraModBase is provided,</span></div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;<span class="comment">// along with a &quot;downcast&quot; operator to get a reference to the object</span></div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;<span class="comment">// as a derived type, and == and != operators.</span></div>
<div class="line"><a name="l00797"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html">  797</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_p_algebra_mod.html">PAlgebraMod</a></div>
<div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;{</div>
<div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160; </div>
<div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;  cloned_ptr&lt;PAlgebraModBase&gt; rep;</div>
<div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160; </div>
<div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;  <span class="comment">// copy constructor: default</span></div>
<div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;  <span class="comment">// assignment: default</span></div>
<div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;  <span class="comment">// destructor: default</span></div>
<div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;  <span class="comment">// NOTE: the use of cloned_ptr ensures that the default copy constructor,</span></div>
<div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;  <span class="comment">// assignment operator, and destructor will work correctly.</span></div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160; </div>
<div class="line"><a name="l00810"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a2e01b309b1c7d5cee040aec8a583d99c">  810</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#a2e01b309b1c7d5cee040aec8a583d99c">PAlgebraMod</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; zMStar, <span class="keywordtype">long</span> r) :</div>
<div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;      rep(<a class="code" href="namespacehelib.html#af7ad5bd5c310b0ad7f96d6e2065e5b2b">buildPAlgebraMod</a>(zMStar, r))</div>
<div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;  {}</div>
<div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;  <span class="comment">// constructor</span></div>
<div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160; </div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;  <span class="keyword">template</span> &lt;<span class="keyword">typename</span> type&gt;</div>
<div class="line"><a name="l00819"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a64aa4324a89d97c13f7ecf03907adb7e">  819</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived&lt;type&gt;</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod.html#a64aa4324a89d97c13f7ecf03907adb7e">getDerived</a>(type)<span class="keyword"> const</span></div>
<div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classhelib_1_1_p_algebra_mod_derived.html">PAlgebraModDerived&lt;type&gt;</a>&amp;<span class="keyword">&gt;</span>(*rep);</div>
<div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;  }</div>
<div class="line"><a name="l00823"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#aa91e7b7ad1db49fc46c88ba3423beac4">  823</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra_mod_cx.html">PAlgebraModCx</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod.html#aa91e7b7ad1db49fc46c88ba3423beac4">getCx</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">dynamic_cast&lt;</span><span class="keyword">const </span><a class="code" href="classhelib_1_1_p_algebra_mod_cx.html">PAlgebraModCx</a>&amp;<span class="keyword">&gt;</span>(*rep);</div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;  }</div>
<div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160; </div>
<div class="line"><a name="l00828"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a4f45b9ce3eda716950ead31d8435a8e8">  828</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#a4f45b9ce3eda716950ead31d8435a8e8">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html">PAlgebraMod</a>&amp; other)<span class="keyword"> const</span></div>
<div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#add86e2396e30c01a5d3601bfbd2115d4">getZMStar</a>() == <a class="code" href="classhelib_1_1_p_algebra_mod.html#add86e2396e30c01a5d3601bfbd2115d4">getZMStar</a>() &amp;&amp; <a class="code" href="classhelib_1_1_p_algebra_mod.html#a47284bb9be92fce02748c0a7b1b6b339">getR</a>() == other.<a class="code" href="classhelib_1_1_p_algebra_mod.html#a47284bb9be92fce02748c0a7b1b6b339">getR</a>();</div>
<div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;  }</div>
<div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;  <span class="comment">// comparison</span></div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160; </div>
<div class="line"><a name="l00834"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#afdd854cc29ea8d267aba8db1042e1f10">  834</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#afdd854cc29ea8d267aba8db1042e1f10">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html">PAlgebraMod</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other); }</div>
<div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;  <span class="comment">// comparison</span></div>
<div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160; </div>
<div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;  <span class="comment">/* direct access to the PAlgebraModBase methods */</span></div>
<div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160; </div>
<div class="line"><a name="l00840"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a2fa24ef48361d12dc562d2b804b51fde">  840</a></span>&#160;  <a class="code" href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">PA_tag</a> <a class="code" href="classhelib_1_1_p_algebra_mod.html#a2fa24ef48361d12dc562d2b804b51fde">getTag</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep-&gt;getTag(); }</div>
<div class="line"><a name="l00842"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#add86e2396e30c01a5d3601bfbd2115d4">  842</a></span>&#160;  <span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; <a class="code" href="classhelib_1_1_p_algebra_mod.html#add86e2396e30c01a5d3601bfbd2115d4">getZMStar</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep-&gt;getZMStar(); }</div>
<div class="line"><a name="l00844"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#ac0ea3e3707ad2ea5a5d65b81f9b82287">  844</a></span>&#160;  <span class="keyword">const</span> std::vector&lt;NTL::ZZX&gt;&amp; <a class="code" href="classhelib_1_1_p_algebra_mod.html#ac0ea3e3707ad2ea5a5d65b81f9b82287">getFactorsOverZZ</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;    <span class="keywordflow">return</span> rep-&gt;getFactorsOverZZ();</div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;  }</div>
<div class="line"><a name="l00849"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a47284bb9be92fce02748c0a7b1b6b339">  849</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#a47284bb9be92fce02748c0a7b1b6b339">getR</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep-&gt;getR(); }</div>
<div class="line"><a name="l00851"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a81574b4fc35a01a298d728d933e8d9c7">  851</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#a81574b4fc35a01a298d728d933e8d9c7">getPPowR</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep-&gt;getPPowR(); }</div>
<div class="line"><a name="l00853"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#a60a48c2620bacac5bea89fc2b44f6e26">  853</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_p_algebra_mod.html#a60a48c2620bacac5bea89fc2b44f6e26">restoreContext</a>()<span class="keyword"> const </span>{ rep-&gt;restoreContext(); }</div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160; </div>
<div class="line"><a name="l00855"></a><span class="lineno"><a class="line" href="classhelib_1_1_p_algebra_mod.html#ab19616a9e9bc6511859f3fed61a9c936">  855</a></span>&#160;  <a class="code" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> <a class="code" href="classhelib_1_1_p_algebra_mod.html#ab19616a9e9bc6511859f3fed61a9c936">getMask_zzX</a>(<span class="keywordtype">long</span> i, <span class="keywordtype">long</span> j)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep-&gt;getMask_zzX(i, j); }</div>
<div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;};</div>
<div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160; </div>
<div class="line"><a name="l00859"></a><span class="lineno"><a class="line" href="namespacehelib.html#aed4e8a7e6a0c99087b87431d7478e4d6">  859</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#aed4e8a7e6a0c99087b87431d7478e4d6">comparePAlgebra</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_p_algebra.html">PAlgebra</a>&amp; palg,</div>
<div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;                     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> m,</div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;                     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> p,</div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;                     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> r,</div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;                     <span class="keyword">const</span> std::vector&lt;long&gt;&amp; gens,</div>
<div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;                     <span class="keyword">const</span> std::vector&lt;long&gt;&amp; ords);</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160; </div>
<div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;<span class="comment">// for internal consumption only</span></div>
<div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;<span class="keywordtype">double</span> <a class="code" href="namespacehelib.html#a742ec1357ca244079dacd7c1cb2fcb90">calcPolyNormBnd</a>(<span class="keywordtype">long</span> m);</div>
<div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160; </div>
<div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160; </div>
<div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;<span class="preprocessor">#endif // #ifndef HELIB_PALGEBRA_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a909cc316ce549f517857b17c172aae7b"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a909cc316ce549f517857b17c172aae7b">helib::PAlgebraModBase::getPPowR</a></div><div class="ttdeci">virtual long getPPowR() const =0</div><div class="ttdoc">The value p^r.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ab01ff1a6b2a0eceba09d688a933de360"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ab01ff1a6b2a0eceba09d688a933de360">helib::PAlgebra::OrderOf</a></div><div class="ttdeci">long OrderOf(long i) const</div><div class="ttdoc">The order of i'th generator (if any)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:217</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a6852047dd695a0b1ae1a5ea03c3b2c53"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a6852047dd695a0b1ae1a5ea03c3b2c53">helib::PAlgebra::getM</a></div><div class="ttdeci">long getM() const</div><div class="ttdoc">Returns m.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:162</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a0bea13d33d64fcaab59ed2b0b5c5100a"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a0bea13d33d64fcaab59ed2b0b5c5100a">helib::PAlgebra::isRep</a></div><div class="ttdeci">bool isRep(long t) const</div><div class="ttdoc">Is t in T?</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:238</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a950ef5b64163f211dd54c7d4489d3aa2"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a950ef5b64163f211dd54c7d4489d3aa2">helib::CubeSignature::getCoord</a></div><div class="ttdeci">long getCoord(long i, long d) const</div><div class="ttdoc">get coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:104</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a5a90fd828a817490c390947228ecf928"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a5a90fd828a817490c390947228ecf928">helib::PAlgebra::getNSlots</a></div><div class="ttdeci">long getNSlots() const</div><div class="ttdoc">The number of plaintext slots = phi(m)/ord(p)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:186</div></div>
<div class="ttc" id="anamespace_n_t_l_html"><div class="ttname"><a href="namespace_n_t_l.html">NTL</a></div><div class="ttdef"><b>Definition:</b> Test_EvalMap.cpp:13</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ade7911f93f80ebe11cf7ba7a59fa921f"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ade7911f93f80ebe11cf7ba7a59fa921f">helib::PAlgebra::indexInZmstar_unchecked</a></div><div class="ttdeci">long indexInZmstar_unchecked(long t) const</div><div class="ttdoc">Returns the index of t in (Z/mZ)* – no range checking.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:244</div></div>
<div class="ttc" id="anamespacehelib_html_a7b1aa9d391c181e780742a2117e9af78"><div class="ttname"><a href="namespacehelib.html#a7b1aa9d391c181e780742a2117e9af78">helib::balanced_zzX</a></div><div class="ttdeci">zzX balanced_zzX(const NTL::zz_pX &amp;f)</div><div class="ttdef"><b>Definition:</b> zzX.cpp:120</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a8486232ca5b941fa989f6cde8fe4f822"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a8486232ca5b941fa989f6cde8fe4f822">helib::PAlgebraModDerived::getCrtCoeffs</a></div><div class="ttdeci">const vec_RX &amp; getCrtCoeffs() const</div><div class="ttdoc">Returns the CRT coefficients: element i contains (prod_{j!=i} F_j)^{-1} mod F_i, where F_0 F_1 ....</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:641</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_ad9f92e66f4d88cf8996a50e48bcecc27"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#ad9f92e66f4d88cf8996a50e48bcecc27">helib::PAlgebraModDerived::embedInAllSlots</a></div><div class="ttdeci">void embedInAllSlots(RX &amp;H, const RX &amp;alpha, const MappingData&lt; type &gt; &amp;mappingData) const</div><div class="ttdoc">Returns H in R[X]/Phi_m(X) s.t. for every t in T, the element Ht = (H mod Ft) in R[X]/Ft(X) represent...</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:886</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a70dba3b1110147859f4c8fd96e6fb716"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a70dba3b1110147859f4c8fd96e6fb716">helib::PAlgebraModDerived::decodePlaintext</a></div><div class="ttdeci">void decodePlaintext(std::vector&lt; RX &gt; &amp;alphas, const RX &amp;ptxt, const MappingData&lt; type &gt; &amp;mappingData) const</div><div class="ttdoc">Return an array such that alphas[i] in R[X]/G(X) represent the same element as rt = (H mod Ft) in R[X...</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:1227</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_aa63328efb58148204ed8a95287be7c19"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#aa63328efb58148204ed8a95287be7c19">helib::PAlgebraModDerived::getZMStar</a></div><div class="ttdeci">virtual const PAlgebra &amp; getZMStar() const override</div><div class="ttdoc">Returns reference to underlying PAlgebra object.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:610</div></div>
<div class="ttc" id="anamespacehelib_html_a4d6002f36f1a61982fded09adf1331ca"><div class="ttname"><a href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">helib::zzX</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; zzX</div><div class="ttdef"><b>Definition:</b> zzX.h:24</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a1e1a00b24fd8cef132e213b1b0c290bc"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a1e1a00b24fd8cef132e213b1b0c290bc">helib::PAlgebra::genToPow</a></div><div class="ttdeci">long genToPow(long i, long j) const</div><div class="ttdoc">the i'th generator to the power j mod m</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:605</div></div>
<div class="ttc" id="astructhelib_1_1half___f_f_t_html_aa631a06ac73e0d395facbe6def99d83a"><div class="ttname"><a href="structhelib_1_1half___f_f_t.html#aa631a06ac73e0d395facbe6def99d83a">helib::half_FFT::fft</a></div><div class="ttdeci">PGFFT fft</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:34</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a81574b4fc35a01a298d728d933e8d9c7"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a81574b4fc35a01a298d728d933e8d9c7">helib::PAlgebraMod::getPPowR</a></div><div class="ttdeci">long getPPowR() const</div><div class="ttdoc">The value p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:851</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_adfc198eb325759da0eb07e1edad86a2b"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#adfc198eb325759da0eb07e1edad86a2b">helib::PAlgebra::addCoord</a></div><div class="ttdeci">long addCoord(long i, long k, long offset) const</div><div class="ttdoc">adds offset to index k in the i'th dimension</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:272</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_ac0ea3e3707ad2ea5a5d65b81f9b82287"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#ac0ea3e3707ad2ea5a5d65b81f9b82287">helib::PAlgebraMod::getFactorsOverZZ</a></div><div class="ttdeci">const std::vector&lt; NTL::ZZX &gt; &amp; getFactorsOverZZ() const</div><div class="ttdoc">Returns reference to the factorization of Phi_m(X) mod p^r, but as ZZX's.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:844</div></div>
<div class="ttc" id="astructhelib_1_1quarter___f_f_t_html_a6a63a9ee127071bb6d8f394aeb6f7589"><div class="ttname"><a href="structhelib_1_1quarter___f_f_t.html#a6a63a9ee127071bb6d8f394aeb6f7589">helib::quarter_FFT::quarter_FFT</a></div><div class="ttdeci">quarter_FFT(long m)</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:182</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a1664ff2b064cf1d7e8c0aca13433b15d"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a1664ff2b064cf1d7e8c0aca13433b15d">helib::PAlgebraModDerived::getR</a></div><div class="ttdeci">virtual long getR() const override</div><div class="ttdoc">The value r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:619</div></div>
<div class="ttc" id="anamespacehelib_html_ab0181d82dc81ed4d1f8c1d950b4efd7eab33244c736f38a4c21e6d86c6a683d58"><div class="ttname"><a href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7eab33244c736f38a4c21e6d86c6a683d58">helib::PA_GF2_tag</a></div><div class="ttdeci">@ PA_GF2_tag</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:297</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ab9403a0bcbcf9bf40931408891e283f9"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ab9403a0bcbcf9bf40931408891e283f9">helib::PAlgebra::getQuarterFFTInfo</a></div><div class="ttdeci">const quarter_FFT &amp; getQuarterFFTInfo() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:292</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a39c3e8cd2438e3215d8b4d24cfd1f235"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a39c3e8cd2438e3215d8b4d24cfd1f235">helib::PAlgebra::assembleIndexByDim</a></div><div class="ttdeci">long assembleIndexByDim(std::pair&lt; long, long &gt; idx, long dim) const</div><div class="ttdoc">The inverse of breakIndexByDim.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:266</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_ad8acaf1efa2937545f2969f408d76b01"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#ad8acaf1efa2937545f2969f408d76b01">helib::PAlgebraModCx::getMask_zzX</a></div><div class="ttdeci">zzX getMask_zzX(UNUSED long i, UNUSED long j) const override</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:783</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a99dfe4797026a43ffa9d5513b77eb709"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a99dfe4797026a43ffa9d5513b77eb709">helib::PAlgebra::indexInZmstar</a></div><div class="ttdeci">long indexInZmstar(long t) const</div><div class="ttdoc">Returns the index of t in (Z/mZ)*.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:241</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ae7353f229e73916f05088c9387728483"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ae7353f229e73916f05088c9387728483">helib::PAlgebra::fftSizeNeeded</a></div><div class="ttdeci">long fftSizeNeeded() const</div><div class="ttdoc">The largest FFT we need to handle degree-m polynomials.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:288</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_abc2f07b5e26ca6c049785b1e138c57b8"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#abc2f07b5e26ca6c049785b1e138c57b8">helib::PAlgebra::getOrdP</a></div><div class="ttdeci">long getOrdP() const</div><div class="ttdoc">The order of p in (Z/mZ)^*.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:171</div></div>
<div class="ttc" id="astructhelib_1_1half___f_f_t_html"><div class="ttname"><a href="structhelib_1_1half___f_f_t.html">helib::half_FFT</a></div><div class="ttdef"><b>Definition:</b> PAlgebra.h:33</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a11f446121f3f4e99004ac5f63cd9222d"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a11f446121f3f4e99004ac5f63cd9222d">helib::PAlgebraModBase::clone</a></div><div class="ttdeci">virtual PAlgebraModBase * clone() const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_logic_error_html"><div class="ttname"><a href="classhelib_1_1_logic_error.html">helib::LogicError</a></div><div class="ttdoc">Inherits from Exception and std::logic_error.</div><div class="ttdef"><b>Definition:</b> exceptions.h:68</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_a3413dd44b1f24d197c62d4747b408608"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#a3413dd44b1f24d197c62d4747b408608">helib::PAlgebraModCx::clone</a></div><div class="ttdeci">PAlgebraModBase * clone() const override</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:770</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a87de36ed5995b6baf94954b6810b9130"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a87de36ed5995b6baf94954b6810b9130">helib::PAlgebraModBase::restoreContext</a></div><div class="ttdeci">virtual void restoreContext() const =0</div><div class="ttdoc">Restores the NTL context for p^r.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a6a60cd957fcf220607acafd96de3737d"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a6a60cd957fcf220607acafd96de3737d">helib::PAlgebra::frobeniusPow</a></div><div class="ttdeci">long frobeniusPow(long j) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:599</div></div>
<div class="ttc" id="aclasshelib_1_1_mapping_data_html"><div class="ttname"><a href="classhelib_1_1_mapping_data.html">helib::MappingData</a></div><div class="ttdoc">Auxiliary structure to support encoding/decoding slots.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:474</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_aa91e7b7ad1db49fc46c88ba3423beac4"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#aa91e7b7ad1db49fc46c88ba3423beac4">helib::PAlgebraMod::getCx</a></div><div class="ttdeci">const PAlgebraModCx &amp; getCx() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:823</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a3e923834650c8fedd2139b416edd5950"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a3e923834650c8fedd2139b416edd5950">helib::PAlgebraModDerived::restoreContext</a></div><div class="ttdeci">virtual void restoreContext() const override</div><div class="ttdoc">Restores the NTL context for p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:625</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_ac929261d8b2667e14b1c8c53e92c7f6c"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#ac929261d8b2667e14b1c8c53e92c7f6c">helib::PAlgebraModCx::getFactorsOverZZ</a></div><div class="ttdeci">const std::vector&lt; NTL::ZZX &gt; &amp; getFactorsOverZZ() const override</div><div class="ttdoc">Returns reference to the factorization of Phi_m(X) mod p^r, but as ZZX's.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:779</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_add86e2396e30c01a5d3601bfbd2115d4"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#add86e2396e30c01a5d3601bfbd2115d4">helib::PAlgebraMod::getZMStar</a></div><div class="ttdeci">const PAlgebra &amp; getZMStar() const</div><div class="ttdoc">Returns reference to underlying PAlgebra object.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:842</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_aa0f6448b824d27233d9fbed310a70641"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#aa0f6448b824d27233d9fbed310a70641">helib::PAlgebra::ZmStarGen</a></div><div class="ttdeci">long ZmStarGen(long i) const</div><div class="ttdoc">the i'th generator in (Z/mZ)^* /(p) (if any)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:205</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a30408cf321051115b46bb75f9c9cc898"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a30408cf321051115b46bb75f9c9cc898">helib::PAlgebra::inZmStar</a></div><div class="ttdeci">bool inZmStar(long t) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:249</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a7bcc03053392d25c4a8d1c3eb36107e1"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a7bcc03053392d25c4a8d1c3eb36107e1">helib::PAlgebraModBase::getZMStar</a></div><div class="ttdeci">virtual const PAlgebra &amp; getZMStar() const =0</div><div class="ttdoc">Returns reference to underlying PAlgebra object.</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_adead1be06feaba45fa7dab3a34b856a3"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#adead1be06feaba45fa7dab3a34b856a3">helib::PAlgebraModBase::getR</a></div><div class="ttdeci">virtual long getR() const =0</div><div class="ttdoc">The value r.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a60a48c2620bacac5bea89fc2b44f6e26"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a60a48c2620bacac5bea89fc2b44f6e26">helib::PAlgebraMod::restoreContext</a></div><div class="ttdeci">void restoreContext() const</div><div class="ttdoc">Restores the NTL context for p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:853</div></div>
<div class="ttc" id="anamespacehelib_html_aec77ae5fa0fd11a0a42e07fefe49b99d"><div class="ttname"><a href="namespacehelib.html#aec77ae5fa0fd11a0a42e07fefe49b99d">helib::assertEq</a></div><div class="ttdeci">void assertEq(const T &amp;a, const T &amp;b, const std::string &amp;message)</div><div class="ttdef"><b>Definition:</b> assertions.h:108</div></div>
<div class="ttc" id="aclasshelib_1_1_mapping_data_html_af2df06fc054ae5ea95959c3b5c1db8ca"><div class="ttname"><a href="classhelib_1_1_mapping_data.html#af2df06fc054ae5ea95959c3b5c1db8ca">helib::MappingData::getDegG</a></div><div class="ttdeci">long getDegG() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:495</div></div>
<div class="ttc" id="astructhelib_1_1quarter___f_f_t_html_a6de8ccec00cdedeedcff3cec9924097a"><div class="ttname"><a href="structhelib_1_1quarter___f_f_t.html#a6de8ccec00cdedeedcff3cec9924097a">helib::quarter_FFT::pow2</a></div><div class="ttdeci">std::vector&lt; std::complex&lt; double &gt; &gt; pow2</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:43</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a503ba4e37bb66427add82ef13a72ab00"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a503ba4e37bb66427add82ef13a72ab00">helib::CubeSignature::addCoord</a></div><div class="ttdeci">long addCoord(long i, long d, long offset) const</div><div class="ttdoc">add offset to coordinate in dimension d of index i</div><div class="ttdef"><b>Definition:</b> hypercube.h:115</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a5563b7dc7f0559d779bf869fbe4b3a5f"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a5563b7dc7f0559d779bf869fbe4b3a5f">helib::PAlgebra::getP</a></div><div class="ttdeci">long getP() const</div><div class="ttdoc">Returns p.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:165</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a07dafff8898d869fdf4cda00aea5453a"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a07dafff8898d869fdf4cda00aea5453a">helib::CubeSignature::incrementCoords</a></div><div class="ttdeci">bool incrementCoords(VecType &amp;v) const</div><div class="ttdef"><b>Definition:</b> hypercube.h:138</div></div>
<div class="ttc" id="aclasshelib_1_1_p_g_f_f_t_html"><div class="ttname"><a href="classhelib_1_1_p_g_f_f_t.html">helib::PGFFT</a></div><div class="ttdef"><b>Definition:</b> PGFFT.h:39</div></div>
<div class="ttc" id="aclasshelib_1_1_mapping_data_html_a0939fcc81b1ac4033a8a165ecd220ae1"><div class="ttname"><a href="classhelib_1_1_mapping_data.html#a0939fcc81b1ac4033a8a165ecd220ae1">helib::MappingData::restoreContextForG</a></div><div class="ttdeci">void restoreContextForG() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:496</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a5152c047d2440c4b26cbfb535b405cb2"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a5152c047d2440c4b26cbfb535b405cb2">helib::PAlgebra::getFFTInfo</a></div><div class="ttdeci">const PGFFT &amp; getFFTInfo() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:290</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a3dcfa1c03e7f17674c16e9d25687f87a"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a3dcfa1c03e7f17674c16e9d25687f87a">helib::PAlgebra::get_cM</a></div><div class="ttdeci">double get_cM() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:196</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a6725ea77f4da18fb3cb4da5d77253e8c"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a6725ea77f4da18fb3cb4da5d77253e8c">helib::PAlgebraModDerived::clone</a></div><div class="ttdeci">virtual PAlgebraModBase * clone() const override</div><div class="ttdoc">Returns a pointer to a &quot;clone&quot;.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:601</div></div>
<div class="ttc" id="astructhelib_1_1quarter___f_f_t_html_a858f766a1f28499f273e08d44d0cd77a"><div class="ttname"><a href="structhelib_1_1quarter___f_f_t.html#a858f766a1f28499f273e08d44d0cd77a">helib::quarter_FFT::pow1</a></div><div class="ttdeci">std::vector&lt; std::complex&lt; double &gt; &gt; pow1</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:43</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a794076ed8df723e12de03a2cdeadcc29"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a794076ed8df723e12de03a2cdeadcc29">helib::PAlgebra::operator!=</a></div><div class="ttdeci">bool operator!=(const PAlgebra &amp;other) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:150</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ae946c16cfbf1d51ae5b2fdb87d08ed89"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ae946c16cfbf1d51ae5b2fdb87d08ed89">helib::PAlgebra::breakIndexByDim</a></div><div class="ttdeci">std::pair&lt; long, long &gt; breakIndexByDim(long idx, long dim) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:261</div></div>
<div class="ttc" id="ahypercube_8h_html"><div class="ttname"><a href="hypercube_8h.html">hypercube.h</a></div><div class="ttdoc">Hypercubes and their slices.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html"><div class="ttname"><a href="classhelib_1_1_p_algebra.html">helib::PAlgebra</a></div><div class="ttdoc">The structure of (Z/mZ)* /(p)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:77</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_abd266cd5f06d96f8628eed8aaf6ee7b7"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#abd266cd5f06d96f8628eed8aaf6ee7b7">helib::PAlgebra::PAlgebra</a></div><div class="ttdeci">PAlgebra(long mm, long pp=2, const std::vector&lt; long &gt; &amp;_gens=std::vector&lt; long &gt;(), const std::vector&lt; long &gt; &amp;_ords=std::vector&lt; long &gt;())</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:430</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a14ea53104683d77545f74fc01046bf37"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a14ea53104683d77545f74fc01046bf37">helib::PAlgebraModDerived::getFactorsOverZZ</a></div><div class="ttdeci">virtual const std::vector&lt; NTL::ZZX &gt; &amp; getFactorsOverZZ() const override</div><div class="ttdoc">Returns reference to the factorization of Phi_m(X) mod p^r, but as ZZX's.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:613</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a3c01f838fab8cee32bc74602df146c79"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a3c01f838fab8cee32bc74602df146c79">helib::PAlgebra::getHalfFFTInfo</a></div><div class="ttdeci">const half_FFT &amp; getHalfFFTInfo() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:291</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a1e0d8be6c51758a86680d3f0f3063606"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a1e0d8be6c51758a86680d3f0f3063606">helib::CubeSignature::getDim</a></div><div class="ttdeci">long getDim(long d) const</div><div class="ttdoc">size of dimension d</div><div class="ttdef"><b>Definition:</b> hypercube.h:92</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a94042541a4cc00ed145b38c77a65ebac"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a94042541a4cc00ed145b38c77a65ebac">helib::CubeSignature::assembleIndexByDim</a></div><div class="ttdeci">long assembleIndexByDim(std::pair&lt; long, long &gt; idx, long dim) const</div><div class="ttdoc">The inverse of breakIndexByDim.</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:29</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_aa2014ae146f28814d83ae8dae0546230"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#aa2014ae146f28814d83ae8dae0546230">helib::PAlgebraModCx::getTag</a></div><div class="ttdeci">PA_tag getTag() const override</div><div class="ttdoc">Returns the type tag: PA_GF2_tag or PA_zz_p_tag.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:771</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_aa5cacf4d0667eb9a921ba5b557a09632"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#aa5cacf4d0667eb9a921ba5b557a09632">helib::PAlgebra::getPhimX</a></div><div class="ttdeci">const NTL::ZZX &amp; getPhimX() const</div><div class="ttdoc">The cyclotomix polynomial Phi_m(X)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:192</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_afd431a1ba58a00ffa22fa05a0b02da67"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#afd431a1ba58a00ffa22fa05a0b02da67">helib::PAlgebra::getPow2</a></div><div class="ttdeci">long getPow2() const</div><div class="ttdoc">if m = 2^k, then pow2 == k; otherwise, pow2 == 0</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:189</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a371f9d8e91bc5cecea179fbbb6a12c4f"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a371f9d8e91bc5cecea179fbbb6a12c4f">helib::PAlgebraModDerived::CRT_decompose</a></div><div class="ttdeci">void CRT_decompose(std::vector&lt; RX &gt; &amp;crt, const RX &amp;H) const</div><div class="ttdoc">Returns a std::vector crt[] such that crt[i] = H mod Ft (with t = T[i])</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:871</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a246a8c53d93ec750140cf253e8b41174"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a246a8c53d93ec750140cf253e8b41174">helib::CubeSignature::getProd</a></div><div class="ttdeci">long getProd(long d) const</div><div class="ttdoc">product of sizes of dimensions d, d+1, ...</div><div class="ttdef"><b>Definition:</b> hypercube.h:95</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_afdd854cc29ea8d267aba8db1042e1f10"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#afdd854cc29ea8d267aba8db1042e1f10">helib::PAlgebraMod::operator!=</a></div><div class="ttdeci">bool operator!=(const PAlgebraMod &amp;other) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:834</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a4f45b9ce3eda716950ead31d8435a8e8"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a4f45b9ce3eda716950ead31d8435a8e8">helib::PAlgebraMod::operator==</a></div><div class="ttdeci">bool operator==(const PAlgebraMod &amp;other) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:828</div></div>
<div class="ttc" id="astructhelib_1_1quarter___f_f_t_html"><div class="ttname"><a href="structhelib_1_1quarter___f_f_t.html">helib::quarter_FFT</a></div><div class="ttdef"><b>Definition:</b> PAlgebra.h:41</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_a5d2fd3234ccb5a63dd2a22d5e6dfcca0"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#a5d2fd3234ccb5a63dd2a22d5e6dfcca0">helib::PAlgebraModCx::getZMStar</a></div><div class="ttdeci">const PAlgebra &amp; getZMStar() const override</div><div class="ttdoc">Returns reference to underlying PAlgebra object.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:773</div></div>
<div class="ttc" id="anamespacehelib_html_ab0181d82dc81ed4d1f8c1d950b4efd7e"><div class="ttname"><a href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7e">helib::PA_tag</a></div><div class="ttdeci">PA_tag</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:296</div></div>
<div class="ttc" id="a_p_algebra_8h_html_a3f121e88d1ede1fd384a8ad4ebb51f41"><div class="ttname"><a href="_p_algebra_8h.html#a3f121e88d1ede1fd384a8ad4ebb51f41">PA_INJECT</a></div><div class="ttdeci">#define PA_INJECT(typ)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:447</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a6348a15c7c781dd026993577bf43a6cb"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a6348a15c7c781dd026993577bf43a6cb">helib::PAlgebra::FrobPerturb</a></div><div class="ttdeci">long FrobPerturb(long i) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:227</div></div>
<div class="ttc" id="aapi_attributes_8h_html_addf5ec070e9499d36b7f2009ce736076"><div class="ttname"><a href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a></div><div class="ttdeci">#define UNUSED</div><div class="ttdef"><b>Definition:</b> apiAttributes.h:31</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_ad6761a53cc4fe80e280958782b18f31e"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#ad6761a53cc4fe80e280958782b18f31e">helib::PAlgebraModCx::getPPowR</a></div><div class="ttdeci">long getPPowR() const override</div><div class="ttdoc">The value p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:775</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a427d4228e407fbf694191ad18842e90d"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a427d4228e407fbf694191ad18842e90d">helib::PAlgebra::SameOrd</a></div><div class="ttdeci">bool SameOrd(long i) const</div><div class="ttdoc">Is ord(i'th generator) the same as its order in (Z/mZ)^*?</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:223</div></div>
<div class="ttc" id="anamespacehelib_html_af7ad5bd5c310b0ad7f96d6e2065e5b2b"><div class="ttname"><a href="namespacehelib.html#af7ad5bd5c310b0ad7f96d6e2065e5b2b">helib::buildPAlgebraMod</a></div><div class="ttdeci">PAlgebraModBase * buildPAlgebraMod(const PAlgebra &amp;zMStar, long r)</div><div class="ttdoc">Builds a table, of type PA_GF2 if p == 2 and r == 1, and PA_zz_p otherwise.</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:631</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_aa2ccff097bb152c82012046e0e781b62"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#aa2ccff097bb152c82012046e0e781b62">helib::PAlgebra::getNormBnd</a></div><div class="ttdeci">double getNormBnd() const</div><div class="ttdoc">max-norm-on-pwfl-basis &lt;= normBnd * max-norm-canon-embed</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:180</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a59d05e06d579ef86cc7d053d43e9717b"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a59d05e06d579ef86cc7d053d43e9717b">helib::PAlgebraModDerived::getTag</a></div><div class="ttdeci">virtual PA_tag getTag() const override</div><div class="ttdoc">Returns the type tag: PA_GF2_tag or PA_zz_p_tag.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:607</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a2b4d5026fe299c45c9d68a76f3ea35e4"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a2b4d5026fe299c45c9d68a76f3ea35e4">helib::PAlgebraModDerived::embedInSlots</a></div><div class="ttdeci">void embedInSlots(RX &amp;H, const std::vector&lt; RX &gt; &amp;alphas, const MappingData&lt; type &gt; &amp;mappingData) const</div><div class="ttdoc">Returns H in R[X]/Phi_m(X) s.t. for every t in T, the element Ht = (H mod Ft) in R[X]/Ft(X) represent...</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:924</div></div>
<div class="ttc" id="anamespacehelib_html_aed4e8a7e6a0c99087b87431d7478e4d6"><div class="ttname"><a href="namespacehelib.html#aed4e8a7e6a0c99087b87431d7478e4d6">helib::comparePAlgebra</a></div><div class="ttdeci">bool comparePAlgebra(const PAlgebra &amp;palg, unsigned long m, unsigned long p, unsigned long r, const std::vector&lt; long &gt; &amp;gens, const std::vector&lt; long &gt; &amp;ords)</div><div class="ttdoc">returns true if the palg parameters match the rest, false otherwise</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ad3d8dd3e7f2bab8486357e0f1e0cc01e"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ad3d8dd3e7f2bab8486357e0f1e0cc01e">helib::PAlgebra::getPolyNormBnd</a></div><div class="ttdeci">double getPolyNormBnd() const</div><div class="ttdoc">max-norm-on-pwfl-basis &lt;= polyNormBnd * max-norm-canon-embed</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:183</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a955b41f3cb844015656bdd5b77e29e42"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a955b41f3cb844015656bdd5b77e29e42">helib::PAlgebraModDerived::getPhimXMod</a></div><div class="ttdeci">const RXModulus &amp; getPhimXMod() const</div><div class="ttdoc">Returns reference to an RXModulus representing Phi_m(X) (mod p^r)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:633</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a8b29b31503217f41ecf84e06bd30c908"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a8b29b31503217f41ecf84e06bd30c908">helib::PAlgebraModDerived::mapToSlots</a></div><div class="ttdeci">void mapToSlots(MappingData&lt; type &gt; &amp;mappingData, const RX &amp;G) const</div><div class="ttdoc">Compute the maps for all the slots. In the current implementation, we if r &gt; 1, then we must have eit...</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:1100</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_afb8bd85921189335d6d6f2fe30011907"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#afb8bd85921189335d6d6f2fe30011907">helib::PAlgebra::getNFactors</a></div><div class="ttdeci">long getNFactors() const</div><div class="ttdoc">The number of distinct prime factors of m.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:174</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_aa7dfc285801f4422ef30fa0409976023"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#aa7dfc285801f4422ef30fa0409976023">helib::PAlgebraModCx::PAlgebraModCx</a></div><div class="ttdeci">PAlgebraModCx(const PAlgebra &amp;palg, long _r)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:762</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a47284bb9be92fce02748c0a7b1b6b339"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a47284bb9be92fce02748c0a7b1b6b339">helib::PAlgebraMod::getR</a></div><div class="ttdeci">long getR() const</div><div class="ttdoc">The value r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:849</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ab3249eb57b3278851dafe777ddad1e29"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ab3249eb57b3278851dafe777ddad1e29">helib::PAlgebra::repInZmstar_unchecked</a></div><div class="ttdeci">long repInZmstar_unchecked(long idx) const</div><div class="ttdoc">Returns rep whose index is i.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:247</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a9b134922f5863ccdaa130a491cad0070"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a9b134922f5863ccdaa130a491cad0070">helib::PAlgebra::nextExpVector</a></div><div class="ttdeci">bool nextExpVector(std::vector&lt; long &gt; &amp;exps) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:282</div></div>
<div class="ttc" id="aapi_attributes_8h_html"><div class="ttname"><a href="api_attributes_8h.html">apiAttributes.h</a></div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a64aa4324a89d97c13f7ecf03907adb7e"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a64aa4324a89d97c13f7ecf03907adb7e">helib::PAlgebraMod::getDerived</a></div><div class="ttdeci">const PAlgebraModDerived&lt; type &gt; &amp; getDerived(type) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:819</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a6f05b5bdfb5c69e175a1108a20b7e897"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a6f05b5bdfb5c69e175a1108a20b7e897">helib::PAlgebraModDerived::getMaskTable</a></div><div class="ttdeci">const std::vector&lt; std::vector&lt; RX &gt; &gt; &amp; getMaskTable() const</div><div class="ttdoc">Returns ref to maskTable, which is used to implement rotations (in the EncryptedArray module).</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:656</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html"><div class="ttname"><a href="classhelib_1_1_cube_signature.html">helib::CubeSignature</a></div><div class="ttdoc">Holds a vector of dimensions for a hypercube and some additional data.</div><div class="ttdef"><b>Definition:</b> hypercube.h:28</div></div>
<div class="ttc" id="astructhelib_1_1half___f_f_t_html_a555b6cca1e0f35cb599448afa16c579e"><div class="ttname"><a href="structhelib_1_1half___f_f_t.html#a555b6cca1e0f35cb599448afa16c579e">helib::half_FFT::half_FFT</a></div><div class="ttdeci">half_FFT(long m)</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:169</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a61bf1413f4b2e9050d83915984036bc6"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a61bf1413f4b2e9050d83915984036bc6">helib::PAlgebraModBase::getMask_zzX</a></div><div class="ttdeci">virtual zzX getMask_zzX(long i, long j) const =0</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a1c496a6f985fecf61f9a117d6c605cd6"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a1c496a6f985fecf61f9a117d6c605cd6">helib::PAlgebraModDerived::getPPowR</a></div><div class="ttdeci">virtual long getPPowR() const override</div><div class="ttdoc">The value p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:622</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_ad04d8b9a2004e0c8e6fe79993b3af266"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#ad04d8b9a2004e0c8e6fe79993b3af266">helib::PAlgebraModDerived::PAlgebraModDerived</a></div><div class="ttdeci">PAlgebraModDerived(const PAlgebra &amp;zMStar, long r)</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:667</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a8b99ace4bf35e1ff128147ca5d58e4d9"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a8b99ace4bf35e1ff128147ca5d58e4d9">helib::PAlgebra::indexOfRep</a></div><div class="ttdeci">long indexOfRep(long t) const</div><div class="ttdoc">Returns the index of t in T.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:235</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a4422e1911052282a6881fa97ae5061dd"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a4422e1911052282a6881fa97ae5061dd">helib::PAlgebra::getPhiM</a></div><div class="ttdeci">long getPhiM() const</div><div class="ttdoc">Returns phi(m)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:168</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a888fa6fa19f172c9f1a27a60a273696c"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a888fa6fa19f172c9f1a27a60a273696c">helib::PAlgebra::printAll</a></div><div class="ttdeci">void printAll() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:148</div></div>
<div class="ttc" id="anamespacehelib_html_ab0181d82dc81ed4d1f8c1d950b4efd7ea7d944116ae9eb1abb2d5fa92bb6d21ee"><div class="ttname"><a href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea7d944116ae9eb1abb2d5fa92bb6d21ee">helib::PA_cx_tag</a></div><div class="ttdeci">@ PA_cx_tag</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:299</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a77519f21f1fb6f9ceaaf5143f1dec93b"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a77519f21f1fb6f9ceaaf5143f1dec93b">helib::CubeSignature::getSize</a></div><div class="ttdeci">long getSize() const</div><div class="ttdoc">total size of cube</div><div class="ttdef"><b>Definition:</b> hypercube.h:89</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_aa19526e11996167ac5fd039771a68293"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#aa19526e11996167ac5fd039771a68293">helib::PAlgebraModDerived::CRT_reconstruct</a></div><div class="ttdeci">void CRT_reconstruct(RX &amp;H, std::vector&lt; RX &gt; &amp;crt) const</div><div class="ttdoc">Returns H in R[X]/Phi_m(X) s.t. for every i&lt;nSlots and t=T[i], we have H == crt[i] (mod Ft)</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:993</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_afb2bad9633f98f52f81a7670c0d9bef4"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#afb2bad9633f98f52f81a7670c0d9bef4">helib::PAlgebra::coordinate</a></div><div class="ttdeci">long coordinate(long i, long k) const</div><div class="ttdoc">Returns coordinate of index k along the i'th dimension.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:257</div></div>
<div class="ttc" id="a_p_g_f_f_t_8h_html"><div class="ttname"><a href="_p_g_f_f_t_8h.html">PGFFT.h</a></div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_ad094fa9125ca7f35bece1480dbb870cb"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#ad094fa9125ca7f35bece1480dbb870cb">helib::PAlgebra::getRadM</a></div><div class="ttdeci">long getRadM() const</div><div class="ttdoc">getRadM() = prod of distinct prime factors of m</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:177</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html">helib::PAlgebraModBase</a></div><div class="ttdoc">Virtual base class for PAlgebraMod.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:419</div></div>
<div class="ttc" id="astructhelib_1_1half___f_f_t_html_abd74c5f01202b914dfe28816585cff9a"><div class="ttname"><a href="structhelib_1_1half___f_f_t.html#abd74c5f01202b914dfe28816585cff9a">helib::half_FFT::pow</a></div><div class="ttdeci">std::vector&lt; std::complex&lt; double &gt; &gt; pow</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:35</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html">helib::PAlgebraMod</a></div><div class="ttdoc">The structure of Z[X]/(Phi_m(X), p)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:798</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a1f95fe47b88f5c8768a53f0b190d15bf"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a1f95fe47b88f5c8768a53f0b190d15bf">helib::PAlgebra::exponentiate</a></div><div class="ttdeci">long exponentiate(const std::vector&lt; long &gt; &amp;exps, bool onlySameOrd=false) const</div><div class="ttdoc">Returns prod_i gi^{exps[i]} mod m. If onlySameOrd=true, use only generators that have the same order ...</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:90</div></div>
<div class="ttc" id="anamespacehelib_html_ab0181d82dc81ed4d1f8c1d950b4efd7ea63d35380340004730e7cb505a4da38e2"><div class="ttname"><a href="namespacehelib.html#ab0181d82dc81ed4d1f8c1d950b4efd7ea63d35380340004730e7cb505a4da38e2">helib::PA_zz_p_tag</a></div><div class="ttdeci">@ PA_zz_p_tag</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:298</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a8df7e36de931c1365efc1a1ec9ef0a59"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a8df7e36de931c1365efc1a1ec9ef0a59">helib::PAlgebraModBase::getTag</a></div><div class="ttdeci">virtual PA_tag getTag() const =0</div><div class="ttdoc">Returns the type tag: PA_GF2_tag or PA_zz_p_tag.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_af85c8c44c0f7b02252d5029b2b78f721"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#af85c8c44c0f7b02252d5029b2b78f721">helib::PAlgebraModDerived::getFactors</a></div><div class="ttdeci">const vec_RX &amp; getFactors() const</div><div class="ttdoc">Returns reference to the factors of Phim_m(X) modulo p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:636</div></div>
<div class="ttc" id="astructhelib_1_1quarter___f_f_t_html_a330b21279057be0d0526e28830d43d74"><div class="ttname"><a href="structhelib_1_1quarter___f_f_t.html#a330b21279057be0d0526e28830d43d74">helib::quarter_FFT::fft</a></div><div class="ttdeci">PGFFT fft</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:42</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a87dae80314766ef1cf15402f040bcd0d"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a87dae80314766ef1cf15402f040bcd0d">helib::PAlgebra::printout</a></div><div class="ttdeci">void printout() const</div><div class="ttdoc">Prints the structure in a readable form.</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:106</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a5e4b044f71ca8edcfa4426cb199461f0"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a5e4b044f71ca8edcfa4426cb199461f0">helib::PAlgebra::numOfGens</a></div><div class="ttdeci">long numOfGens() const</div><div class="ttdoc">The prime-power factorization of m.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:202</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_ae9aa0cf6f8db16b0eaad3f2d4362a37c"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#ae9aa0cf6f8db16b0eaad3f2d4362a37c">helib::PAlgebraModBase::getFactorsOverZZ</a></div><div class="ttdeci">virtual const std::vector&lt; NTL::ZZX &gt; &amp; getFactorsOverZZ() const =0</div><div class="ttdoc">Returns reference to the factorization of Phi_m(X) mod p^r, but as ZZX's.</div></div>
<div class="ttc" id="aclasshelib_1_1_cube_signature_html_a52ab718393d2c41b96b000948adc6e0b"><div class="ttname"><a href="classhelib_1_1_cube_signature.html#a52ab718393d2c41b96b000948adc6e0b">helib::CubeSignature::breakIndexByDim</a></div><div class="ttdeci">std::pair&lt; long, long &gt; breakIndexByDim(long idx, long dim) const</div><div class="ttdef"><b>Definition:</b> hypercube.cpp:20</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a09f3f7d864c1989663a51f43984777f3"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a09f3f7d864c1989663a51f43984777f3">helib::PAlgebra::ith_rep</a></div><div class="ttdeci">long ith_rep(long i) const</div><div class="ttdoc">Returns the i'th element in T.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:232</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_ab19616a9e9bc6511859f3fed61a9c936"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#ab19616a9e9bc6511859f3fed61a9c936">helib::PAlgebraMod::getMask_zzX</a></div><div class="ttdeci">zzX getMask_zzX(long i, long j) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:855</div></div>
<div class="ttc" id="acloned_ptr_8h_html"><div class="ttname"><a href="cloned_ptr_8h.html">clonedPtr.h</a></div><div class="ttdoc">Implementation of smart pointers with &quot;deep cloning&quot; semantics.</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a29eea1b1f91c49000f1ce02b5546e73a"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a29eea1b1f91c49000f1ce02b5546e73a">helib::PAlgebra::set_cM</a></div><div class="ttdeci">void set_cM(double c)</div><div class="ttdoc">The &quot;ring constant&quot; cM.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:195</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html">helib::PAlgebraModCx</a></div><div class="ttdef"><b>Definition:</b> PAlgebra.h:757</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_afa945a421ee7efc5c29bd0e54ece935d"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#afa945a421ee7efc5c29bd0e54ece935d">helib::PAlgebraModCx::restoreContext</a></div><div class="ttdeci">void restoreContext() const override</div><div class="ttdoc">Restores the NTL context for p^r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:776</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a4bc2cd5d3763efc2f1886cc8a6a6a80c"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a4bc2cd5d3763efc2f1886cc8a6a6a80c">helib::PAlgebraModDerived::getMask_zzX</a></div><div class="ttdeci">zzX getMask_zzX(long i, long j) const override</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:658</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a2fa24ef48361d12dc562d2b804b51fde"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a2fa24ef48361d12dc562d2b804b51fde">helib::PAlgebraMod::getTag</a></div><div class="ttdeci">PA_tag getTag() const</div><div class="ttdoc">Returns the type tag: PA_GF2_tag or PA_zz_p_tag.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:840</div></div>
<div class="ttc" id="aclasshelib_1_1_mapping_data_html_aedaecfbec10f647a8bfafee57c4f5b9f"><div class="ttname"><a href="classhelib_1_1_mapping_data.html#aedaecfbec10f647a8bfafee57c4f5b9f">helib::MappingData::getG</a></div><div class="ttdeci">const RX &amp; getG() const</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:494</div></div>
<div class="ttc" id="anamespacehelib_html_a742ec1357ca244079dacd7c1cb2fcb90"><div class="ttname"><a href="namespacehelib.html#a742ec1357ca244079dacd7c1cb2fcb90">helib::calcPolyNormBnd</a></div><div class="ttdeci">double calcPolyNormBnd(long m)</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:212</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_afeebe2f4b6e54aea60d2cd85d364712c"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#afeebe2f4b6e54aea60d2cd85d364712c">helib::PAlgebraModDerived::buildLinPolyCoeffs</a></div><div class="ttdeci">void buildLinPolyCoeffs(std::vector&lt; RX &gt; &amp;C, const std::vector&lt; RX &gt; &amp;L, const MappingData&lt; type &gt; &amp;mappingData) const</div><div class="ttdoc">Returns a coefficient std::vector C for the linearized polynomial representing M.</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:1265</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_html_a2e01b309b1c7d5cee040aec8a583d99c"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod.html#a2e01b309b1c7d5cee040aec8a583d99c">helib::PAlgebraMod::PAlgebraMod</a></div><div class="ttdeci">PAlgebraMod(const PAlgebra &amp;zMStar, long r)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:810</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a69f13c0ea26e5965d55ecae8e4ca936f"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a69f13c0ea26e5965d55ecae8e4ca936f">helib::PAlgebraModDerived::PAlgebraModDerived</a></div><div class="ttdeci">PAlgebraModDerived(const PAlgebraModDerived &amp;other)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:559</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html">helib::PAlgebraModDerived</a></div><div class="ttdoc">A concrete instantiation of the virtual class.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:468</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_base_html_a98ba2824e68366e7266717ff9f077334"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_base.html#a98ba2824e68366e7266717ff9f077334">helib::PAlgebraModBase::~PAlgebraModBase</a></div><div class="ttdeci">virtual ~PAlgebraModBase()</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:422</div></div>
<div class="ttc" id="azz_x_8h_html"><div class="ttname"><a href="zz_x_8h.html">zzX.h</a></div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_derived_html_a998b31a5d4f8f114b4582d5035decd63"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_derived.html#a998b31a5d4f8f114b4582d5035decd63">helib::PAlgebraModDerived::operator=</a></div><div class="ttdeci">PAlgebraModDerived &amp; operator=(const PAlgebraModDerived &amp;other)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:576</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a6e1077c7f6b83071d3bcdd7370ecbe1a"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a6e1077c7f6b83071d3bcdd7370ecbe1a">helib::PAlgebra::operator==</a></div><div class="ttdeci">bool operator==(const PAlgebra &amp;other) const</div><div class="ttdef"><b>Definition:</b> PAlgebra.cpp:80</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_html_a0388643441be4063002c63398b770361"><div class="ttname"><a href="classhelib_1_1_p_algebra.html#a0388643441be4063002c63398b770361">helib::PAlgebra::ProdOrdsFrom</a></div><div class="ttdeci">long ProdOrdsFrom(long i) const</div><div class="ttdoc">The product prod_{j=i}^{n-1} OrderOf(i)</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:220</div></div>
<div class="ttc" id="aclasshelib_1_1_p_algebra_mod_cx_html_a9df1389f699003bf1579b22efb4cc546"><div class="ttname"><a href="classhelib_1_1_p_algebra_mod_cx.html#a9df1389f699003bf1579b22efb4cc546">helib::PAlgebraModCx::getR</a></div><div class="ttdeci">long getR() const override</div><div class="ttdoc">The value r.</div><div class="ttdef"><b>Definition:</b> PAlgebra.h:774</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
